package com.cyandpos.pad.pay.model;



import com.cyandpos.pad.netdata.R_Addpay;
import com.cyandpos.pad.posdata.Member;
import com.cyandpos.pad.posdata.Payment;
import com.cyandpos.pad.posdata.QueryMemberRequest;
import com.cyandpos.pad.posdata.RefundOrder;
import com.cyandpos.pad.posdata.TicketInfo;

import java.util.List;

/**
 * Created by zx on 2017/3/23.
 */

public interface IPayNetRequestModel {
    /**
     *  同步付款
     * @param listener
     */
    void loadAddpayInfo(String orderNo, List<Payment> payItems, int saleType, boolean clearFlag, AddpayRequestListener listener);
    interface AddpayRequestListener {
        void getAddpayInfoSuccess(R_Addpay addPayRes);
        void getAddpayInfoFailure(String msg);
    }

    /**
     * 完成订单
     * @param mTicket
     * @param isCancelAfterSwipe 是否取消后刷卡 true 取消
     * @param listener
     */
    void loadCommitPayInfo(TicketInfo mTicket, boolean isCancelAfterSwipe, CommitPayRequestListener listener);
    interface CommitPayRequestListener {
        void getCommitPayInfoSuccess(TicketInfo ticket, boolean isCancelAfterSwipe);
        void getCommitPayInfoFailure(String msg);
    }

    /**
     * 返券后刷卡查询会员
     * @param requestParam
     * @param listener
     */
    void loadGetVipCardToGrantVoucher(QueryMemberRequest requestParam, LoadGetVipCardToGrantVoucherListener listener);
    interface LoadGetVipCardToGrantVoucherListener {
        void getloadGetVipCardToGrantVoucherSuccess(Member member);
        void getloadGetVipCardToGrantVoucherFailure(String msg);
    }
    void queryDepositInfo(String depositNo, QueryDepositInfoListener listener);
    interface QueryDepositInfoListener {
        void getDepositInfoSuccess(RefundOrder depositNo);
        void getDepositInfoFailure(String msg);
    }
}
